package com.itheima.strengthen.test02.dao;

import com.itheima.strengthen.test02.domain.NuoZhou;
import com.itheima.strengthen.test02.domain.Skills;

public class nuoshouDao {
    static NuoZhou nuoZhou = new NuoZhou();

    public void sendAtrribute(NuoZhou nuoZhou) {
        this.nuoZhou = nuoZhou;
    }

    public NuoZhou mpAtrributeChange(Skills skills) {
        nuoZhou.sethMp(nuoZhou.gethMp() - skills.getsMp());
        return nuoZhou;
    }

    public NuoZhou hpAtrributeChange(Skills skills) {
        nuoZhou.sethHp((int) (nuoZhou.gethHp() - skills.getsAttack()));
        return nuoZhou;
    }

    public NuoZhou hpAtrributeChange(double hAttack) {
        nuoZhou.sethHp((int) (nuoZhou.gethHp() - hAttack));
        return nuoZhou;
    }
}
